package edu.uw.nemo.model;

import java.util.HashMap;
import java.util.Map;

/**
 * captures metrics during a run.
 *
 * Created by joglekaa on 5/13/15.
 */
public class Metrics {

    public static final String TOTAL_DURATION = "total_duration";
    public static final String ENUMERATION_DURATION = "enumeration_duration";
    public static final String LOAD_DURATION = "load_duration";
    public static final String COUNT = "count";
    public static final String K = "sub_graph_length";
    public static final String N = "number_of_cores";

    private Map<String, Object> metrics = new HashMap<String, Object>();

    public void addMetric(String key, Object value) {
        this.metrics.put(key, value);
    }

    public Object get(String key) {
        return metrics.get(key);
    }

    public void print() {
        for(String key : metrics.keySet()) {
            System.out.println("key [" + key + "] has value [" + metrics.get(key) + "].");
        }
    }

}
